from django.urls import path,re_path

from rest_framework_jwt.views import obtain_jwt_token

from users import views

urlpatterns = [
    # 登录
    path(r"login/",obtain_jwt_token),
    # 实现滑块验证
    path(r"captcha/", views.CaptchaAPIView.as_view()),
    # 实现注册功能
    path(r"register/", views.UserAPIView.as_view()),
    # 验证手机号的唯一性
    re_path(r"mobile/(?P<mobile>1[3-9]\d{9})/", views.MobileAPIView.as_view()),
    # 实现发送短信验证码
    re_path("sms/(?P<mobile>1[3-9]\d{9})/", views.SMSAPIView.as_view()),
    # 实现短信验证码登录
    re_path("smsm/(?P<mobile>1[3-9]\d{9})/", views.SMSMAPIView.as_view()),
    path(r"sm/", views.YZMAPIView.as_view()),
]





